<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>Objective-C之NS_ASSUME_NONNULL_BEGIN &amp; NS_ASSUME_NONNULL_END | 山芋头</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="NS_ASSUME_NONNULL_BEGIN &amp;&amp; NS_ASSUME_NONNULL_END在Swift中存在Option类型，也就是使用？和！声明的变量。但是OC里面没有这个特征,因为在XCODE6.3之后出现新的关键词定义用于OC转SWIFT时候可以区分到底是什么类型 nullable &amp;&amp; _nonnull__nullable指代对象可以为NULL或者为N">
<meta property="og:type" content="article">
<meta property="og:title" content="Objective-C之NS_ASSUME_NONNULL_BEGIN &amp; NS_ASSUME_NONNULL_END">
<meta property="og:url" content="https://bianchengme.gitee.io/2020/04/24/Objective-C%E4%B9%8BNS-ASSUME-NONNULL-BEGIN-NS-ASSUME-NONNULL-END/index.html">
<meta property="og:site_name" content="山芋头">
<meta property="og:description" content="NS_ASSUME_NONNULL_BEGIN &amp;&amp; NS_ASSUME_NONNULL_END在Swift中存在Option类型，也就是使用？和！声明的变量。但是OC里面没有这个特征,因为在XCODE6.3之后出现新的关键词定义用于OC转SWIFT时候可以区分到底是什么类型 nullable &amp;&amp; _nonnull__nullable指代对象可以为NULL或者为N">
<meta property="og:locale" content="cn">
<meta property="article:published_time" content="2020-04-24T07:46:31.000Z">
<meta property="article:modified_time" content="2020-07-28T05:41:08.579Z">
<meta property="article:author" content="jmme@foxmail.com">
<meta property="article:tag" content="iOS">
<meta property="article:tag" content="Objective-C">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/atom.xml" title="山芋头" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="/css/style.css">

<meta name="generator" content="Hexo 4.2.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">山芋头</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/" id="subtitle">记录和分享能创造价值</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://bianchengme.gitee.io"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-Objective-C之NS-ASSUME-NONNULL-BEGIN-NS-ASSUME-NONNULL-END" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2020/04/24/Objective-C%E4%B9%8BNS-ASSUME-NONNULL-BEGIN-NS-ASSUME-NONNULL-END/" class="article-date">
  <time datetime="2020-04-24T07:46:31.000Z" itemprop="datePublished">2020-04-24</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/iOS/">iOS</a>►<a class="article-category-link" href="/categories/iOS/Objective-C/">Objective-C</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      Objective-C之NS_ASSUME_NONNULL_BEGIN &amp; NS_ASSUME_NONNULL_END
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="NS-ASSUME-NONNULL-BEGIN-amp-amp-NS-ASSUME-NONNULL-END"><a href="#NS-ASSUME-NONNULL-BEGIN-amp-amp-NS-ASSUME-NONNULL-END" class="headerlink" title="NS_ASSUME_NONNULL_BEGIN &amp;&amp; NS_ASSUME_NONNULL_END"></a>NS_ASSUME_NONNULL_BEGIN &amp;&amp; NS_ASSUME_NONNULL_END</h1><p>在Swift中存在Option类型，也就是使用？和！声明的变量。但是OC里面没有这个特征,因为在XCODE6.3之后出现新的关键词定义用于OC转SWIFT时候可以区分到底是什么类型</p>
<p><strong>nullable &amp;&amp; _</strong>nonnull<br>__nullable指代对象可以为NULL或者为NIL<br>__nonnull指代对象不能为null<br>当我们不遵循这一规则时，编译器就会给出警告。</p>
<p>我们来看看以下的实例，</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">@interface TestNullabilityClass ()</span><br><span class="line">@property (nonatomic, copy) NSArray * items;</span><br><span class="line">- (id)itemWithName:(NSString * __nonnull)name;</span><br><span class="line">@end</span><br><span class="line">@implementation TestNullabilityClass</span><br><span class="line">...</span><br><span class="line">- (void)testNullability &#123;</span><br><span class="line">    [self itemWithName:nil];    &#x2F;&#x2F; 编译器警告：Null passed to a callee that requires a non-null argument</span><br><span class="line">&#125;</span><br><span class="line">- (id)itemWithName:(NSString * __nonnull)name &#123;</span><br><span class="line">    return nil;</span><br><span class="line">&#125;</span><br><span class="line">@end</span><br></pre></td></tr></table></figure>

<p>事实上，在任何可以使用<code>const</code>关键字的地方都可以使用<code>__nullable</code>和<code>__nonnull</code>，不过这两个关键字仅限于使用在指针类型上。而在方法的声明中，我们还可以使用不带下划线的<code>nullable</code>和<code>nonnull</code>，如下所示：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">- (nullable id)itemWithName:(NSString * nonnull)name</span><br></pre></td></tr></table></figure>

<p>在属性声明中，也增加了两个相应的特性，因此上例中的items属性可以如下声明：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">@property (nonatomic, copy, nonnull) NSArray * items;</span><br></pre></td></tr></table></figure>

<p>当然也可以用以下这种方式：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">@property (nonatomic, copy) NSArray * __nonnull items;</span><br></pre></td></tr></table></figure>

<p>推荐使用<code>nonnul</code>l这种方式，这样可以让属性声明看起来更清晰。</p>
<p><code>Non null</code>区域设置(Audited Regions)</p>
<p>如果需要每个属性或每个方法都去指定<code>nonnull</code>和<code>nullable</code>，是一件非常繁琐的事。苹果为了减轻我们的工作量，专门提供了两个宏：<code>NS_ASSUME_NONNULL_BEGIN</code>和<code>NS_ASSUME_NONNULL_END</code>。在这两个宏之间的代码，所有简单指针对象都被假定为nonnull，因此我们只需要去指定那些nullable的指针。如下代码所示：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">NS_ASSUME_NONNULL_BEGIN</span><br><span class="line">@interface TestNullabilityClass ()</span><br><span class="line">@property (nonatomic, copy) NSArray * items;</span><br><span class="line">- (id)itemWithName:(nullable NSString *)name;</span><br><span class="line">@end</span><br><span class="line">NS_ASSUME_NONNULL_END</span><br></pre></td></tr></table></figure>

<p>在上面的代码中，items属性默认是<code>non null</code>的，itemWithName:方法的返回值也是<code>non null</code>，而参数是指定为<code>nullable</code>的。</p>
<p>不过，为了安全起见，苹果还制定了几条规则：</p>
<p>typedef定义的类型的nullability特性通常依赖于上下文，即使是在Audited Regions中，也不能假定它为<code>nonnulla</code>。<br> 复杂的指针类型(如id *)必须显示去指定是<code>nonnull</code>还是<code>nullable</code>。例如，指定一个指向<code>nullable</code>对象的<code>nonnull</code>指针，可以使用</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">__nullable id * __nonnull</span><br></pre></td></tr></table></figure>

<p>我们经常使用的<code>NSError **</code>通常是被假定为一个指向<code>nullable NSError</code>对象的nullable指针。<br> 兼容性</p>
<p>因为Nullability Annotations是Xcode 6.3新加入的，所以我们需要考虑之前的老代码。实际上，苹果已以帮我们处理好了这种兼容问题，我们可以安全地使用它们：</p>
<p>老代码仍然能正常工作， 即使对<code>nonnull</code>对象使用了nil也没有问题。<br> 老代码在需要和swift混编时，在新的swift编译器下会给出一个警告。<br> <code>nonnull</code>不会影响性能。事实上，我们仍然可以在运行时去判断我们的对象是否为<code>nil</code>。<br> 事实上，我们可以将<code>nonnull/nullable</code>与我们的断言和异常一起看待，其需要处理的问题都是同一个：违反约定是一个程序员的错误。特别是，返回值是我们可控的东西，如果返回值是<code>nonnull</code>的，则我们不应该返回<code>nil</code>，除非是为了向后兼容。</p>
<h1 id="NS-ENUM-AVAILABLE-IOS"><a href="#NS-ENUM-AVAILABLE-IOS" class="headerlink" title="NS_ENUM_AVAILABLE_IOS"></a>NS_ENUM_AVAILABLE_IOS</h1><p>从单词的字面可以看出使用这个宏说明这个枚举开始IOS的版本</p>
<blockquote>
<p>IOS版本如下 7_0 代表7.0的版本.用_替换<br> 参数只有一个NS_ENUM_AVAILABLE_IOS(2_0) 代表&gt;=2.0开始</p>
</blockquote>
<h1 id="NS-ENUM-DEPRECATED-IOS"><a href="#NS-ENUM-DEPRECATED-IOS" class="headerlink" title="NS_ENUM_DEPRECATED_IOS"></a>NS_ENUM_DEPRECATED_IOS</h1><p>代表枚举类型已经过时的API 第一个参数是开始的时候，第二个参数是过时的时候</p>
<blockquote>
<p>NS_ENUM_DEPRECATED_IOS(2_0,7_0) 代表开始于IOS2.0废弃于IOS7.0 也就是&gt;=2.0 &lt;=7.0</p>
</blockquote>
<h1 id="TVOS-PROHIBITED"><a href="#TVOS-PROHIBITED" class="headerlink" title="__TVOS_PROHIBITED"></a>__TVOS_PROHIBITED</h1><blockquote>
<p>代表这个枚举或者类，方法，参数在TVOS系统上面不能使用</p>
</blockquote>
<figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">typedef</span> <span class="built_in">NS_ENUM</span>(<span class="built_in">NSInteger</span>, <span class="built_in">UIStatusBarStyle</span>) &#123;</span><br><span class="line">    <span class="built_in">UIStatusBarStyleDefault</span>                                     = <span class="number">0</span>, <span class="comment">// Dark content, for use on light backgrounds</span></span><br><span class="line">    <span class="built_in">UIStatusBarStyleLightContent</span>     <span class="built_in">NS_ENUM_AVAILABLE_IOS</span>(<span class="number">7</span>_0) = <span class="number">1</span>, <span class="comment">// Light content, for use on dark backgrounds</span></span><br><span class="line"></span><br><span class="line">    <span class="built_in">UIStatusBarStyleBlackTranslucent</span> <span class="built_in">NS_ENUM_DEPRECATED_IOS</span>(<span class="number">2</span>_0, <span class="number">7</span>_0, <span class="string">"Use UIStatusBarStyleLightContent"</span>) = <span class="number">1</span>,</span><br><span class="line">    <span class="built_in">UIStatusBarStyleBlackOpaque</span>      <span class="built_in">NS_ENUM_DEPRECATED_IOS</span>(<span class="number">2</span>_0, <span class="number">7</span>_0, <span class="string">"Use UIStatusBarStyleLightContent"</span>) = <span class="number">2</span>,</span><br><span class="line">&#125; __TVOS_PROHIBITED;</span><br></pre></td></tr></table></figure>

<h1 id="UIKIT-EXTERN"><a href="#UIKIT-EXTERN" class="headerlink" title="UIKIT_EXTERN"></a>UIKIT_EXTERN</h1><blockquote>
<p><code>extern</code>这个是定义字符串 变量 比<code>#define</code>更加的高效 .但是UIKIT_EXTERN是根据是否是C语言宏定义，根据语言区分 ，比extern更加的高效</p>
</blockquote>
<h6 id="例子"><a href="#例子" class="headerlink" title="例子"></a>例子</h6><figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">UIKIT_EXTERN</span> <span class="built_in">NSString</span> *<span class="keyword">const</span> <span class="built_in">UIApplicationInvalidInterfaceOrientationException</span> <span class="built_in">NS_AVAILABLE_IOS</span>(<span class="number">6</span>_0) __TVOS_PROHIBITED;</span><br></pre></td></tr></table></figure>

<blockquote>
<p>上面的代码一般定义在.H 在.M实现 实现要去掉UIKIT_EXTERN.代表IOS6.0之后可以用，在TVOS系统不可用。</p>
</blockquote>
<h1 id="NS-CLASS-AVAILABLE-IOS"><a href="#NS-CLASS-AVAILABLE-IOS" class="headerlink" title="NS_CLASS_AVAILABLE_IOS"></a>NS_CLASS_AVAILABLE_IOS</h1><blockquote>
<p>代表类开始的API 和上面说的类似</p>
</blockquote>
<h6 id="例子-1"><a href="#例子-1" class="headerlink" title="例子"></a>例子</h6><figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">NS_CLASS_AVAILABLE_IOS</span>(<span class="number">2</span>_0) <span class="class"><span class="keyword">@interface</span> <span class="title">UIApplication</span> : <span class="title">UIResponder</span></span></span><br></pre></td></tr></table></figure>

<h1 id="NS-EXTENSION-UNAVAILABLE-IOS"><a href="#NS-EXTENSION-UNAVAILABLE-IOS" class="headerlink" title="NS_EXTENSION_UNAVAILABLE_IOS"></a>NS_EXTENSION_UNAVAILABLE_IOS</h1><blockquote>
<p>标记IOS插件不能使用这些API,后面有一个参数，可以作为提示，用什么API替换</p>
</blockquote>
<h6 id="例子-2"><a href="#例子-2" class="headerlink" title="例子"></a>例子</h6><figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">+ (<span class="built_in">UIApplication</span> *)sharedApplication <span class="built_in">NS_EXTENSION_UNAVAILABLE_IOS</span>(<span class="string">"Use view controller based solutions where appropriate instead."</span>);</span><br></pre></td></tr></table></figure>

<h1 id="kindof"><a href="#kindof" class="headerlink" title="__kindof"></a>__kindof</h1><blockquote>
<p>可以参考下面的连接 我就不多啰嗦了</p>
</blockquote>
<p><a href="https://link.jianshu.com?t=http://blog.csdn.net/leikezhu1981/article/details/47418011" target="_blank" rel="noopener">Xcode 7新的特性Lightweight Generics 轻量级泛型与__kindof修饰符</a></p>
<h1 id="NS-REQUIRES-SUPER"><a href="#NS-REQUIRES-SUPER" class="headerlink" title="NS_REQUIRES_SUPER"></a>NS_REQUIRES_SUPER</h1><blockquote>
<p>字面上必须继承父类的方法(有待考证)</p>
</blockquote>
<h1 id="SDK-HIDE-TIDE"><a href="#SDK-HIDE-TIDE" class="headerlink" title="SDK_HIDE_TIDE"></a>SDK_HIDE_TIDE</h1><blockquote>
<p>暂定 没查到干什么的 字面上是在SDK隐藏</p>
</blockquote>
<h1 id="NS-DESIGNATED-INITIALIZER"><a href="#NS-DESIGNATED-INITIALIZER" class="headerlink" title="NS_DESIGNATED_INITIALIZER"></a>NS_DESIGNATED_INITIALIZER</h1><blockquote>
<p>用来定义一些初始化方法只能过来这些标记的初始化</p>
</blockquote>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://bianchengme.gitee.io/2020/04/24/Objective-C%E4%B9%8BNS-ASSUME-NONNULL-BEGIN-NS-ASSUME-NONNULL-END/" data-id="cktcaskhj001r3guc0sqf5y36" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Objective-C/" rel="tag">Objective-C</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/iOS/" rel="tag">iOS</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2020/04/24/Cocoapods-CDN-%E9%94%99%E8%AF%AF/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          Cocoapods CDN 错误
        
      </div>
    </a>
  
  
    <a href="/2020/04/19/%E7%94%A8clang%E7%BC%96%E8%AF%91Objective-C%E5%AF%B9%E8%B1%A1%EF%BC%8C%E7%90%86%E8%A7%A3%E8%BF%90%E8%A1%8C%E6%97%B6%E6%9C%BA%E5%88%B6/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">用clang编译Objective-C对象，理解运行时机制</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Docker/">Docker</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/Docker/Nacos/">Nacos</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Docker/mysql/">mysql</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/JAVA/">JAVA</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/JAVA/JVM/">JVM</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/Markdown/">Markdown</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Windows/">Windows</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/docker/">docker</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/docker/redis/">redis</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/flutter/">flutter</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/git/">git</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/iOS/">iOS</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/iOS/Objective-C/">Objective-C</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/iOS/Xcode/">Xcode</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/java/">java</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/java/%E5%A4%9A%E7%BA%BF%E7%A8%8B/">多线程</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/mysql/">mysql</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/vue/">vue</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/BUG/" rel="tag">BUG</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Docker/" rel="tag">Docker</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/JAVA/" rel="tag">JAVA</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/JVM/" rel="tag">JVM</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Markdown/" rel="tag">Markdown</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Objective-C/" rel="tag">Objective-C</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/RunTime/" rel="tag">RunTime</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Swift/" rel="tag">Swift</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/UI/" rel="tag">UI</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Windows/" rel="tag">Windows</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Xcode/" rel="tag">Xcode</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/docker/" rel="tag">docker</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/flutter/" rel="tag">flutter</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/" rel="tag">git</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hook/" rel="tag">hook</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/iOS/" rel="tag">iOS</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/iOS%E7%9C%9F%E6%9C%BA%E8%BF%90%E8%A1%8C/" rel="tag">iOS真机运行</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/java/" rel="tag">java</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mysl/" rel="tag">mysl</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mysql/" rel="tag">mysql</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/nacos/" rel="tag">nacos</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/redis/" rel="tag">redis</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/volatile/" rel="tag">volatile</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vue/" rel="tag">vue</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E4%BC%98%E5%8C%96/" rel="tag">优化</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%A4%9A%E7%BA%BF%E7%A8%8B/" rel="tag">多线程</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%AD%A6%E4%B9%A0%E8%AE%A1%E5%88%92/" rel="tag">学习计划</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%B7%A5%E5%85%B7/" rel="tag">工具</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/" rel="tag">并发编程</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E7%AE%97%E6%B3%95/" rel="tag">算法</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E7%BD%91%E7%BB%9C/" rel="tag">网络</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E9%83%A8%E7%BD%B2/" rel="tag">部署</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E9%9D%A2%E8%AF%95/" rel="tag">面试</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/BUG/" style="font-size: 10px;">BUG</a> <a href="/tags/Docker/" style="font-size: 10px;">Docker</a> <a href="/tags/JAVA/" style="font-size: 10px;">JAVA</a> <a href="/tags/JVM/" style="font-size: 10px;">JVM</a> <a href="/tags/Markdown/" style="font-size: 10px;">Markdown</a> <a href="/tags/Objective-C/" style="font-size: 16.67px;">Objective-C</a> <a href="/tags/RunTime/" style="font-size: 10px;">RunTime</a> <a href="/tags/Swift/" style="font-size: 10px;">Swift</a> <a href="/tags/UI/" style="font-size: 13.33px;">UI</a> <a href="/tags/Windows/" style="font-size: 10px;">Windows</a> <a href="/tags/Xcode/" style="font-size: 10px;">Xcode</a> <a href="/tags/docker/" style="font-size: 13.33px;">docker</a> <a href="/tags/flutter/" style="font-size: 13.33px;">flutter</a> <a href="/tags/git/" style="font-size: 10px;">git</a> <a href="/tags/hook/" style="font-size: 10px;">hook</a> <a href="/tags/iOS/" style="font-size: 20px;">iOS</a> <a href="/tags/iOS%E7%9C%9F%E6%9C%BA%E8%BF%90%E8%A1%8C/" style="font-size: 10px;">iOS真机运行</a> <a href="/tags/java/" style="font-size: 16.67px;">java</a> <a href="/tags/mysl/" style="font-size: 10px;">mysl</a> <a href="/tags/mysql/" style="font-size: 10px;">mysql</a> <a href="/tags/nacos/" style="font-size: 10px;">nacos</a> <a href="/tags/redis/" style="font-size: 10px;">redis</a> <a href="/tags/volatile/" style="font-size: 10px;">volatile</a> <a href="/tags/vue/" style="font-size: 10px;">vue</a> <a href="/tags/%E4%BC%98%E5%8C%96/" style="font-size: 10px;">优化</a> <a href="/tags/%E5%A4%9A%E7%BA%BF%E7%A8%8B/" style="font-size: 10px;">多线程</a> <a href="/tags/%E5%AD%A6%E4%B9%A0%E8%AE%A1%E5%88%92/" style="font-size: 10px;">学习计划</a> <a href="/tags/%E5%B7%A5%E5%85%B7/" style="font-size: 10px;">工具</a> <a href="/tags/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/" style="font-size: 10px;">并发编程</a> <a href="/tags/%E7%AE%97%E6%B3%95/" style="font-size: 10px;">算法</a> <a href="/tags/%E7%BD%91%E7%BB%9C/" style="font-size: 10px;">网络</a> <a href="/tags/%E9%83%A8%E7%BD%B2/" style="font-size: 10px;">部署</a> <a href="/tags/%E9%9D%A2%E8%AF%95/" style="font-size: 10px;">面试</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/09/">September 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/07/">July 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/06/">June 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/05/">May 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/03/">March 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/10/">October 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/09/">September 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/08/">August 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/07/">July 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/05/">May 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/04/">April 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/03/">March 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/06/">June 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/05/">May 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/04/">April 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/03/">March 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/02/">February 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/10/">October 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/03/">March 2018</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2021/09/07/JVM-%E9%80%83%E9%80%B8%E5%88%86%E6%9E%90%E4%BC%98%E5%8C%96/">JVM 逃逸分析优化</a>
          </li>
        
          <li>
            <a href="/2021/07/02/Nacos%E9%80%9A%E8%BF%87Docke%E9%83%A8%E7%BD%B2/">Nacos通过Docke部署</a>
          </li>
        
          <li>
            <a href="/2021/07/01/Docker%E5%AE%89%E8%A3%85mysql5-7/">Docker安装mysql5.7</a>
          </li>
        
          <li>
            <a href="/2021/07/01/Docker%E5%AE%89%E8%A3%85redis/">Docker安装redis</a>
          </li>
        
          <li>
            <a href="/2021/06/30/Java%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B-volatile%E5%85%B3%E9%94%AE%E5%AD%97%E7%90%86%E8%A7%A3/">Java并发编程-volatile关键字理解</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2021 jmme@foxmail.com<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">

  
<script src="/fancybox/jquery.fancybox.pack.js"></script>




<script src="/js/script.js"></script>




  </div>
</body>
</html>